{layout name="merchant/layout_iframe" /}
<fieldset class="layui-elem-field layui-field-title" ><legend>{$title}</legend></fieldset>
<form class="layui-form">
    <div class="layui-form-item">
        <label class="layui-form-label">客服名称</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-username" lay-verify="required" type="text" placeholder="客服名称" name="username" value="" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">客服头像</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-avatar" lay-verify="required" type="text" placeholder="客服头像" name="avatar" value="" />
        </div>
        <div class="layui-form-mid layui-word-aux">任意URL地址</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">优先级别</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-sort" lay-verify="required" type="text" placeholder="优先级别" name="sort" value="100" />
        </div>
        <div class="layui-form-mid layui-word-aux">默认值100,数字越大优先级越高</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">唯一编码</label>
        <div class="layui-input-inline"><span type='html' class="layui-input field-code"></span></div>
            
        <div class="layui-form-mid layui-word-aux">仅可查看不可修改</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> </label>
        <div class="layui-input-block">
            {:token()}
            <input type="hidden" name="id" class="field-id">
            <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit">提交</button>
            <a href="{:url('index')}"  class="layui-btn " >返回</a>
        </div>
    </div>
</form>
{include file="merchant/layout_layui" /}
<script>
    var formData = {:json_encode($formData)};
    layui.use(['form', 'func'], function() {
        var $ = layui.jquery, form = layui.form;
        layui.func.assign(formData);
    });
</script>